from SocialChurning.SpreadActivation import SpreadActivation
__author__ = 'pstalidis'


G = SpreadActivation()

E = [(1, 2, 1), (2, 1, 1),
     (1, 3, 2), (3, 1, 2),
     (1, 4, 2), (4, 1, 2),
     (2, 4, 1), (4, 2, 1),
     (3, 5, 1), (5, 3, 1)
     ]

G.add_weighted_edges_from(E)
G.normalize_weights(strength="weight")

G.setup_energy([1, 3], initial_energy=1.0, energy="energy")

G.predict(spreading_factor=0.75, accuracy_threshold=0.01, activation_threshold=0, strength="weight", energy="energy")

